Ensure users are able to edit the page after changing the content model
It is possible for page restrictions to be dependent upon the content
model a page. The best example of this is user JavaScript and CSS
subpages. This adds a Title::setContentModel() function which allows
mocking a Title's content model for the purpose of permission checks.
EditPage and Special:ChangeContentModel were updated to ensure the user
can edit the page with the newly proposed content model before making
the change.
Title::$mContentModel was made private to make sure nothing else mucks
around with it. There were no uses outside of Title anyways.
Bug: T145316
Change-Id: I28c46f408cadf65ed1868401cd00dc15e5acd2fe